-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
operator: Add PodAntiAffinity overwrites per component #9408
Conversation
81bb4ae
to
3f4561e
Compare
|
||
// PodAntiAffinity defines the pod anti affinity scheduling rules to schedule pods | ||
// of a component. | ||
// | ||
// +optional | ||
// +kubebuilder:validation:Optional | ||
PodAntiAffinity *corev1.PodAntiAffinity `json:"podAntiAffinity,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK, anti-affinity is only a pod-level concept in k8s. So WDYT to skip the Pod
prefix here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't 100% agree with this just because it assumes the user also knows about that "truth", while the full name makes it more explicit and clear. But I'm happy to oblige if it makes more sense to drop the Pod
prefix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why var_test_lib.go
and not simply var_test.go
? Furthermore I believe all these tests belong in node_placement_test.go
anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If defined the function in node_placement_test.go
then 2 things would happen:
- I could not export it because otherwise it would be run by the
go test
command and it would always fail - Since I could not export it, some components would not be able to access it since it would not be exported, because their tests are not on the package
manifest_test
.
However, given #9408 (comment) we will stop using an auxiliary function for the tests and we will have a single function so this stops being a problem.
3ea17e6
to
526fad0
Compare
8597b35
to
6df88e1
Compare
Issue: https://issues.redhat.com/browse/LOG-3854 Refactors Affinity/AntiAffinity tests to reduce code duplication Signed-off-by: Joao Marcal <jmarcal@redhat.com>
9fa2dc0
to
bf051a5
Compare
Signed-off-by: Joao Marcal <jmarcal@redhat.com>
What this PR does / why we need it:
Issue: https://issues.redhat.com/browse/LOG-3854
Adds PodAffinity and PodAntiAffinity overwrites per component
Refactors Affinity/AntiAffinity tests to reduce code duplication
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Checklist
CONTRIBUTING.md
guide (required)CHANGELOG.md
updateddocs/sources/upgrading/_index.md